package hottargui.domain;

/**
 * Responsibilitys:
 * 
 * a) Determine if the Round is finish.
 *  
 */
public interface EndRoundStrategy {

	/**
	 * If a turn has ended. The question is if the state 
	 * should be State.EndRound or State.EndTurn. This method 
	 * returns either, depending on gamevarient. 
	 * @return State.EndRonud if the round has finished or State.EndTurn if it hasn't.  
	 */	
	public State calculateEndOfRound();

	/**
	 * Sets the deck of cards. 
	 * Ignored if the gamevariant dosn't use a gamevariant 
	 * @param deck a deck of cards. 
	 */

	public void setDeckOfCards(DeckOfCards deck); 


	/**
	 * In some gamevariants a dice roll is allowed after  
	 * an endRound, ex. the gammavariant a dicethrow is valid (nessesary) when a round has 
	 * ended and there are no more cards in the deck.  
	 * @return if a diceroll is allowed after and end round - depending on gamevariant.  
	 */	
	public boolean diceRollAllowed();


	/**
	 * To syncronize objects having a reference to a deck. Call this method
	 * TODO: Implement this in an object server
	 * @param deck a deck of cards
	 */
	public void doUpdateDeck(DeckOfCards deck);

}
